# coding: utf-8
# @Author : lryself
# @Date : 2020/10/29 17:30
# @Software: PyCharm
from . import db


class InformationCode(db.Model):
    __tablename__ = 'information_codes'

    codeID = db.Column(db.String(30, 'utf8_general_ci'), primary_key=True, info='节点主键')
    codeName = db.Column(db.String(255, 'utf8_general_ci'), nullable=False, info='节点名称')
    parentCodeID = db.Column(db.String(30, 'utf8_general_ci'), nullable=False, server_default=db.FetchedValue(), info='父节点ID（0表示是第一个节点）')
    createTime = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue(), info='创建时间')